# Contributor: Peter Bui <pnutzh4x0r@gmail.com>
# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
pkgname=py3-httplib2
_pkgname=httplib2
pkgver=0.18.1
pkgrel=0
pkgdesc="Python3 HTTP client library"
url="https://github.com/httplib2/httplib2"
arch="noarch"
license="MIT"
depends="python3"
makedepends="py3-setuptools"
checkdepends="py3-pytest py3-pytest-cov py3-pytest-timeout py3-mock"
source="https://files.pythonhosted.org/packages/source/h/httplib2/httplib2-$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"

replaces="py-httplib2" # Backwards compatibility
provides="py-httplib2=$pkgver-r$pkgrel" # Backwards compatibility

build() {
	python3 setup.py build
}

check() {
	PYTHONPATH="$PWD/build/lib" python3 -m pytest tests/
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}

sha512sums="a1bb527279bdc92fb75bffebc317ff549bb6efb678580cbe40d187921b7ace66b1a5bc1d98bdf065ec5667fe69632da086b0eb201ff911497324fd817bfe1b7a  httplib2-0.18.1.tar.gz"
